summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_parser.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2023-01-09 11:22:39 -0300
committerAnton Khirnov <anton@khirnov.net>2023-02-09 15:35:14 +0100
commit3ceffe783965767e62d59e8e68ecd265c98460ec (patch)
tree969d9bac9d858f6749ab62180960cf3af9cc4df6 /libavcodec/mpegvideo_parser.c
parent5f9e848e686a3c0795939809712b260af5c1adb8 (diff)
downloadffmpeg-3ceffe783965767e62d59e8e68ecd265c98460ec.tar.gz
avcodec: remove FF_API_FLAG_TRUNCATED
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/mpegvideo_parser.c')
-rw-r--r--libavcodec/mpegvideo_parser.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c
index 57bc1f706c..8e7e88ff25 100644
--- a/libavcodec/mpegvideo_parser.c
+++ b/libavcodec/mpegvideo_parser.c
@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/avassert.h"
#include "decode.h"
#include "parser.h"
#include "mpeg12.h"
@@ -33,7 +34,6 @@ struct MpvParseContext {
int width, height;
};
-#if !FF_API_FLAG_TRUNCATED
/**
* Find the end of the current frame in the bitstream.
* @return the position of the first byte of the next frame, or -1
@@ -98,7 +98,6 @@ static int mpeg1_find_frame_end(ParseContext *pc, const uint8_t *buf,
pc->state = state;
return END_NOT_FOUND;
}
-#endif
static void mpegvideo_extract_headers(AVCodecParserContext *s,
AVCodecContext *avctx,
@@ -255,11 +254,7 @@ static int mpegvideo_parse(AVCodecParserContext *s,
if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){
next= buf_size;
}else{
-#if FF_API_FLAG_TRUNCATED
- next= ff_mpeg1_find_frame_end(pc, buf, buf_size, s);
-#else
next = mpeg1_find_frame_end(pc, buf, buf_size, s);
-#endif
if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
*poutbuf = NULL;