X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmodules%2Favformat%2Fconsumer_avformat.c;h=f96640aa74eb9ae10e19611727c6d221ac5d3030;hb=c06e689e3c0b269add217452fca192e99104f7ea;hp=07e80ea9ff8175518f65ef16c077cb6ba840d587;hpb=d8c0e6fe4ce1bcf6d272593cf8105496d870e9fd;p=mlt diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c index 07e80ea9..f96640aa 100644 --- a/src/modules/avformat/consumer_avformat.c +++ b/src/modules/avformat/consumer_avformat.c @@ -1275,13 +1275,16 @@ static void *consumer_thread( void *arg ) frame = mlt_consumer_rt_frame( consumer ); // Set the timecode from the MLT metadata if available. - const char *timecode = mlt_properties_get( MLT_FRAME_PROPERTIES(frame), "meta.attr.vitc.markup" ); - if ( timecode && strcmp( timecode, "" ) ) - { - mlt_properties_set( properties, "timecode", timecode ); - if ( strchr( timecode, ';' ) ) - mlt_properties_set_int( properties, "drop_frame_timecode", 1 ); - } + if ( frame ) + { + const char *timecode = mlt_properties_get( MLT_FRAME_PROPERTIES(frame), "meta.attr.vitc.markup" ); + if ( timecode && strcmp( timecode, "" ) ) + { + mlt_properties_set( properties, "timecode", timecode ); + if ( strchr( timecode, ';' ) ) + mlt_properties_set_int( properties, "drop_frame_timecode", 1 ); + } + } // Add audio and video streams if ( video_codec_id != CODEC_ID_NONE )