Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: source/patched-ffmpeg-mt/libavformat/avidec.c

Issue 3384002: ffmpeg source update for sep 09 (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/patched-ffmpeg-mt/libavformat/avformat.h ('k') | source/patched-ffmpeg-mt/libavformat/avio.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/patched-ffmpeg-mt/libavformat/avidec.c
===================================================================
--- source/patched-ffmpeg-mt/libavformat/avidec.c (revision 59334)
+++ source/patched-ffmpeg-mt/libavformat/avidec.c (working copy)
@@ -759,7 +759,7 @@
for (i=0; i<s->nb_streams; i++) {
st = s->streams[i];
ast = st->priv_data;
- if (st->discard < AVDISCARD_ALL && ast->sub_pkt.data) {
+ if (st->discard < AVDISCARD_ALL && ast && ast->sub_pkt.data) {
ts = av_rescale_q(ast->sub_pkt.dts, st->time_base, AV_TIME_BASE_Q);
if (ts <= next_ts && ts < ts_min) {
ts_min = ts;
@@ -1294,12 +1294,14 @@
AVStream *st = s->streams[i];
AVIStream *ast = st->priv_data;
av_free(st->codec->palctrl);
- if (ast->sub_ctx) {
- av_freep(&ast->sub_ctx->pb);
- av_close_input_stream(ast->sub_ctx);
+ if (ast) {
+ if (ast->sub_ctx) {
+ av_freep(&ast->sub_ctx->pb);
+ av_close_input_stream(ast->sub_ctx);
+ }
+ av_free(ast->sub_buffer);
+ av_free_packet(&ast->sub_pkt);
}
- av_free(ast->sub_buffer);
- av_free_packet(&ast->sub_pkt);
}
if (avi->dv_demux)
« no previous file with comments | « source/patched-ffmpeg-mt/libavformat/avformat.h ('k') | source/patched-ffmpeg-mt/libavformat/avio.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698