Re: [Bug 94] ffmpegwriter crashes when writing divx

Sven Schnelle <[email protected]>
Newsgroups gmane.comp.video.gephex.devel
Message-ID <[email protected]>
Hi,

[email protected] writes:

> fix:
> http://people.gephex.org/~mandlm/arch/
> [email protected]/gephex--ffmpeg--0.4--patch-1

Oh, cool :) But we should fix the wrong declaration/cast of encmap, because
gephex is still crashing. I changed the declaration to const char *,
because a string class is not really needed ;) :

--- orig/modules/src/ffmpegoutmodule/ffmpegwriter.cpp
+++ mod/modules/src/ffmpegoutmodule/ffmpegwriter.cpp
@@ -103,7 +103,7 @@
 
 int FFMpegWriter::initEncoder()
 {
-  fmt = guess_format(encmap.find(encstr)->second.second.c_str(), NULL,
 NULL);
+  fmt = guess_format(encmap.find(encstr)->second.second, NULL, NULL);
   bps = encmap.find(encstr)->second.first;
 
   // use mpeg if unable to guess


--- orig/modules/src/ffmpegoutmodule/ffmpegwriter.h
+++ mod/modules/src/ffmpegoutmodule/ffmpegwriter.h
@@ -61,7 +61,7 @@
   int x_res, y_res;
   unsigned int bps;
 
-  std::map<std::string, std::pair<int, std::string> > encmap;
+  std::map<std::string, std::pair<int, const char*> > encmap;
 
   uint8_t *video_outbuf;
   int video_outbuf_size;

Sven.
-- 
"There are two major products that come out of Berkeley: LSD and UNIX.
 We don't believe this to be a coincidence." Jeremy S. Anderson

_______________________________________________
gephex-devel mailing list
[email protected]
http://lists.gephex.org/mailman/listinfo/gephex-devel
signature.asc (application/pgp-signature, 188 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQBCHyH+86MdxiXaIbERAnWqAKCo4bgoaLELqXOFOdBa9KYn6dnbfACgiLos
E/rtpj0XmCGVzIvAmjamb3w=
=4YIt
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.