[gstreamer-bugs] [Bug 433245] New: Non-mutex-protected calls to avcodec_open/_close
bugzilla-daemon at bugzilla.gnome.org
Wed Apr 25 01:55:38 PDT 2007
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
GStreamer | gst-ffmpeg | Ver: HEAD CVS
Summary: Non-mutex-protected calls to avcodec_open/_close
Version: HEAD CVS
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: bilboed at bilboed.com
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME version: Unspecified
GNOME milestone: Unspecified
We have mutexes to protect our explicit calls to avcodec_open/_close in
gst-ffmpeg since it's not thread-safe.
The problem is that some code in ffmpeg does call avcodec_open/_close, so we
need to protect some other ffmpeg calls with the same mutex.
* libavformat/utils.c . avcodec_open() is called in try_to_decode_frame() which
is called by av_find_stream_info(). avcodec_close() is also called in
av_find_stream_info(). Therefore any calls to av_find_stream_info() should be
protected by the avcodec_open/_close mutex.
* libavformat/jpeg.c . avcodec_open() is called in the read function. BUT
considering that we don't use the jpeg "demuxer", we don't need to do anything.
* libavcodec/mpegvideo.c . This is a tricky one. Called in
estimate_best_b_count(), which is called in select_input_picture() IF the
b_frame_strategy == 2, which is called in MPV_encode_picture(), which is the
encoding entry point for mpeg video encoders... BUT AFAIK, we don't modify
b_frame_strategy in gst-ffmpeg encoders, so it's always 0, and therefore the
call to avcodec_open/close is never done.
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=433245.
More information about the Gstreamer-bugs