summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
Diffstat (limited to 'libhb')
-rw-r--r--libhb/hb.c9
-rw-r--r--libhb/hbffmpeg.h1
-rw-r--r--libhb/stream.c2
3 files changed, 11 insertions, 1 deletions
diff --git a/libhb/hb.c b/libhb/hb.c
index 36fcd75c9..fcb4a55df 100644
--- a/libhb/hb.c
+++ b/libhb/hb.c
@@ -82,6 +82,15 @@ int hb_avcodec_open(AVCodecContext *avctx, AVCodec *codec)
return ret;
}
+int hb_av_find_stream_info(AVFormatContext *ic)
+{
+ int ret;
+ hb_lock( hb_avcodec_lock );
+ ret = av_find_stream_info( ic );
+ hb_unlock( hb_avcodec_lock );
+ return ret;
+}
+
int hb_avcodec_close(AVCodecContext *avctx)
{
int ret;
diff --git a/libhb/hbffmpeg.h b/libhb/hbffmpeg.h
index 7c17e1a64..8a7dc90fe 100644
--- a/libhb/hbffmpeg.h
+++ b/libhb/hbffmpeg.h
@@ -9,4 +9,5 @@
void hb_avcodec_init(void);
int hb_avcodec_open( AVCodecContext *, struct AVCodec * );
int hb_avcodec_close( AVCodecContext * );
+int hb_av_find_stream_info(AVFormatContext *ic);
int hb_ff_layout_xlat(int64_t ff_layout, int channels);
diff --git a/libhb/stream.c b/libhb/stream.c
index 85a891c7b..f37985424 100644
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -2909,7 +2909,7 @@ static int ffmpeg_open( hb_stream_t *stream, hb_title_t *title )
{
return 0;
}
- if ( av_find_stream_info( ic ) < 0 )
+ if ( hb_av_find_stream_info( ic ) < 0 )
goto fail;
stream->ffmpeg_ic = ic;