summaryrefslogtreecommitdiff
path: root/libavformat/ty.c
Commit message (Collapse)AuthorAgeFilesLines
* avformat: Avoid allocation for AVStreamInternalAndreas Rheinhardt2021-09-171-2/+2
| | | | | | | | | | Do this by allocating AVStream together with the data that is currently in AVStreamInternal; or rather: Put AVStream at the beginning of a new structure called FFStream (which encompasses more than just the internal fields and is a proper context in its own right, hence the name) and remove AVStreamInternal altogether. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avformat: move AVStream.{parser,need_parsing} to AVStreamInternalJames Almer2021-05-071-2/+2
| | | | | | | Those are private fields, no reason to have them exposed in a public header. Signed-off-by: James Almer <jamrial@gmail.com>
* avformat: Constify all muxer/demuxersAndreas Rheinhardt2021-04-271-1/+1
| | | | | | | This is possible now that the next-API is gone. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/ty: Remove write-only array and variableAndreas Rheinhardt2020-08-111-67/+1
| | | | | | | | | | | | | | | | Up until now, the TiVo demuxer parse an array of SEQ entries, yet it has never ever made any use of them. In fact, parse_master, the function parsing said table, only influenced the outside world in three ways: Via an excessive amount of error message in case a certain parameter is not what it expected; via an allocation (the aforementioned write-only array); and by setting a certain parameter (ty->cur_chunk_pos), but that parameter is always overwritten before it is used (it is overwritten in get_chunk() on success and if get_chunk() fails, the error is returned to the caller anyway). So remove the array and the function used to parse it. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat: Forward errors where possibleAndreas Rheinhardt2019-12-121-14/+14
| | | | | | | | | | It is not uncommon to find code where the caller thinks to know better what the return value should be than the callee. E.g. something like "if (av_new_packet(pkt, size) < 0) return AVERROR(ENOMEM);". This commit changes several instances of this to instead forward the actual error. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavf: Constify the probe function argument.Carl Eugen Hoyos2019-03-211-1/+1
| | | | | Reviewed-by: Lauri Kasanen Reviewed-by: Tomas Härdin
* libavformat/ty: use decimal constant for shiftMichael Niedermayer2018-10-071-1/+1
| | | | | | | This was the only case in the source that uses a hexadecimal shift value. The change removed a special case in respect to greping Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avformat/ty: check cur_chunk_pos before using itPaul B Mahol2017-11-121-0/+2
| | | | | | Fixes #6831. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat/ty: fix memory leaksPaul B Mahol2017-11-121-0/+11
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat/ty: check if header is correctly parsed and is still presentPaul B Mahol2017-11-121-2/+4
| | | | | | Fixes #6829. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat/ty: fix format specifiers in debug log messagesJames Almer2017-11-081-2/+2
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avformat/ty: do not overread chunkPaul B Mahol2017-11-061-0/+4
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat/ty: try harder to find stream signaturePaul B Mahol2017-11-061-4/+9
| | | | | | Search all chunks, not just first one. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* avformat: add TiVo ty demuxerPaul B Mahol2017-11-061-0/+765
Signed-off-by: Paul B Mahol <onemda@gmail.com>