Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-05-10avformat/mux_utils: Move ff_format_shift_data to new file for mux utilsAndreas Rheinhardt
It is only used by muxers. Given that it is not part of the core muxing code and given that mux.c is already big enough, it is moved to a new file for utility functions for muxing. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-03-15segafilm: convert to new channel layout APIVittorio Giovara
Signed-off-by: James Almer <jamrial@gmail.com>
2022-01-04avformat/segafilmenc: use ff_format_shift_data for shiftingMarton Balint
Signed-off-by: Marton Balint <cus@passwd.hu>
2021-04-27avformat: Constify all muxer/demuxersAndreas Rheinhardt
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>
2020-07-26avformat/segafilmenc: Avoid seek when writing headerAndreas Rheinhardt
Up until now, the Sega FILM muxer would first write all the packet data, then shift the data (in the muxer's write_trailer function) by the amount necessary to write the header at the front (which entails a seek to the front), then seek back to the beginning and actually write the header. This commit changes this: The dynamic buffer that is used to write the sample table (containing information about each sample in the file) is now used to write the complete header. This is possible because the size of everything in the header except the sample table is known in advance. Said buffer can then be used as one of the two temporary buffers used for shifting which also reduces the amount one has to allocate for this. Thereby the header will be written when shifting, so that the second seek to the beginning is unnecessary. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-26avformat/segafilmenc: Don't store packet info in linked listAndreas Rheinhardt
Up until now, the Sega FILM muxer would store some information about each packet in a linked list. When writing the trailer, the information in said linked list would be used to write a table in the file header. Each entry in said table is 16 bytes long, but each entry of the linked list is 32 bytes long (assuming 64 bit pointer and no padding). Therefore it makes sense to remove the linked list and write the array entries directly into a dynamic buffer while writing the packet (this is possible because the table entries don't depend on any information not available when writing the packet (the offset is not relative to the beginning of the file, but to the end of the table). This also simplifies writing the array at the end (there is no need to traverse a linked list). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-26avformat/segafilmenc: Simplify writing two bytesAndreas Rheinhardt
Use avio_wb16() instead of avio_write() to write two zero bytes. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-26avformat/segafilmenc: Remove write-only variableAndreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-02-25avformat/segafilmenc: Add deinit functionAndreas Rheinhardt
Prevents memleaks when the trailer is never written or when shifting the data fails when writing the trailer. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-25avformat/segafilmenc: Combine several checksAndreas Rheinhardt
by moving them around. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-22avformat/segafilmenc: Remove redundant checksAndreas Rheinhardt
If an audio stream is present, the Sega FILM muxer checks for its compability with the container during init, so that the very same check needn't be repeated during writing the trailer. Essentially the same is true for the presence of a video stream: It has already been checked during init. Furthermore, after the check for the presence of a video stream succeeded, a pointer is set to point to the video stream. Yet said pointer (which was NULL before) will be derefenced anyway regardless of the result of the check. Coverity thus complained about this in CID 1434155 and removing this pointless check will also fix this issue. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-02-16avformat/segafilmenc: Remove AVClassAndreas Rheinhardt
This muxer does not have any private options and so does not need a private class. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-17avformat/movenc, segafilmenc: Remove unnecessary avio_tell()Andreas Rheinhardt
When the faststart option for the mov/mp4 muxer is used, the current position (i.e. the size of the already written data pre-shifting) was evaluated twice: First in an initialization and then again later, overwriting the first value without having ever touched it. So remove the initialization. Also, the clone of this code in the Sega FILM muxer behaves the same and has been treated the same. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-15avformat/segafilmenc: Check early whether video is allowedAndreas Rheinhardt
The current code only checks when writing the trailer whether the video format and Codec ID are actually compatible with the container. At this point, a lot of data will already have been written (in vain, of course), so check during the init function instead. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-15avformat/segafilmenc: Postpone check for existence of video streamAndreas Rheinhardt
Up until now, the Sega FILM muxer complained if the first stream wasn't a video stream that there is no video stream at all which is of course nonsense. So postpone this check. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-15avformat/segafilmenc: Fix undefined left shift of 1 by 31 placesAndreas Rheinhardt
by changing the type to unsigned. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2020-01-07avformat: remove more unneeded avio_flush() callsMarton Balint
These instances are simply redundant or present because avio_flush() used to be required before doing a seekback. That is no longer the case, aviobuf code does the flush automatically on seek. This only affects code which is either disabled for streaming IO contexts or does no seekbacks after the flush, so this change should have no adverse effect on streaming. Signed-off-by: Marton Balint <cus@passwd.hu>
2019-10-22avformat/segafilmenc: remove unneeded codeSteven Liu
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-05-08avformat/segafilmenc - set keyframe bit correctlyGyan Doshi
As per https://web.archive.org/web/20020803104640/http://www.pcisys.net:80/~melanson/codecs/film-format.txt, the top bit of the info1 chunk is set as 1 for inter-coded frames and 0 otherwise.
2018-04-10lavf/segafilmenc: Do not mix variable declaration and code.Carl Eugen Hoyos
Fixes two warnings: ISO C90 forbids mixed declarations and code
2018-04-06Add Sega FILM muxerMisty De Meo
Signed-off-by: Josh de Kock <josh@itanimul.li>