"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libavformat/matroskadec.c" between
libav-12.tar.gz and libav-12.1.tar.gz

About: libav provides cross-platform tools ("avconv") and libraries to convert, manipulate and stream a wide range of multimedia (audio and video) formats and protocols.

matroskadec.c  (libav-12):matroskadec.c  (libav-12.1)
skipping to change at line 753 skipping to change at line 753
return 0; return 0;
} }
/* /*
* Read the next element as binary data. * Read the next element as binary data.
* 0 is success, < 0 is failure. * 0 is success, < 0 is failure.
*/ */
static int ebml_read_binary(AVIOContext *pb, int length, EbmlBin *bin) static int ebml_read_binary(AVIOContext *pb, int length, EbmlBin *bin)
{ {
av_free(bin->data); av_free(bin->data);
bin->size = 0;
if (!(bin->data = av_mallocz(length + AV_INPUT_BUFFER_PADDING_SIZE))) if (!(bin->data = av_mallocz(length + AV_INPUT_BUFFER_PADDING_SIZE)))
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
bin->size = length;
bin->pos = avio_tell(pb); bin->pos = avio_tell(pb);
if (avio_read(pb, bin->data, length) != length) { if (avio_read(pb, bin->data, length) != length) {
av_freep(&bin->data); av_freep(&bin->data);
return AVERROR(EIO); return AVERROR(EIO);
} }
bin->size = length;
return 0; return 0;
} }
/* /*
* Read the next element, but only the header. The contents * Read the next element, but only the header. The contents
* are supposed to be sub-elements which can be read separately. * are supposed to be sub-elements which can be read separately.
* 0 is success, < 0 is failure. * 0 is success, < 0 is failure.
*/ */
static int ebml_read_master(MatroskaDemuxContext *matroska, uint64_t length) static int ebml_read_master(MatroskaDemuxContext *matroska, uint64_t length)
{ {
skipping to change at line 2443 skipping to change at line 2446
av_free(pkt_data); av_free(pkt_data);
pkt->flags = is_keyframe; pkt->flags = is_keyframe;
pkt->stream_index = st->index; pkt->stream_index = st->index;
if (track->ms_compat) if (track->ms_compat)
pkt->dts = timecode; pkt->dts = timecode;
else else
pkt->pts = timecode; pkt->pts = timecode;
pkt->pos = pos; pkt->pos = pos;
if (track->type != MATROSKA_TRACK_TYPE_SUBTITLE || st->codecpar->codec_id == AV_CODEC_ID_TEXT) if (track->type != MATROSKA_TRACK_TYPE_SUBTITLE || st->codecpar->codec_id == AV_CODEC_ID_SRT)
pkt->duration = duration; pkt->duration = duration;
#if FF_API_CONVERGENCE_DURATION #if FF_API_CONVERGENCE_DURATION
FF_DISABLE_DEPRECATION_WARNINGS FF_DISABLE_DEPRECATION_WARNINGS
if (st->codecpar->codec_id == AV_CODEC_ID_TEXT) if (st->codecpar->codec_id == AV_CODEC_ID_SRT)
pkt->convergence_duration = duration; pkt->convergence_duration = duration;
FF_ENABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS
#endif #endif
if (st->codecpar->codec_id == AV_CODEC_ID_SSA) if (st->codecpar->codec_id == AV_CODEC_ID_SSA)
matroska_fix_ass_packet(matroska, pkt, duration); matroska_fix_ass_packet(matroska, pkt, duration);
if (matroska->prev_pkt && if (matroska->prev_pkt &&
timecode != AV_NOPTS_VALUE && timecode != AV_NOPTS_VALUE &&
matroska->prev_pkt->pts == timecode && matroska->prev_pkt->pts == timecode &&
 End of changes. 5 change blocks. 
3 lines changed or deleted 6 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS