[FFmpeg-devel] [PATCH 2/3] lavc/mjpeg_parser: use ff_mjpeg_decode_header to parse frame info
James Almer
jamrial at gmail.com
Fri Jun 28 19:56:00 EEST 2019
On 6/27/2019 9:59 AM, Zhong Li wrote:
> Signed-off-by: Zhong Li <zhong.li at intel.com>
> ---
> libavcodec/mjpeg_parser.c | 158 +++++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 157 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/mjpeg_parser.c b/libavcodec/mjpeg_parser.c
> index 07a6b2b..f59aa3e 100644
> --- a/libavcodec/mjpeg_parser.c
> +++ b/libavcodec/mjpeg_parser.c
> @@ -27,12 +27,131 @@
> */
>
> #include "parser.h"
> +#include "mjpeg.h"
> +#include "mjpegdec.h"
> +#include "get_bits.h"
>
> typedef struct MJPEGParserContext{
> ParseContext pc;
> + MJpegDecodeContext dec_ctx;
This is not acceptable. The parser shouldn't use decoder structs, as it
makes the former depend on the latter.
A reusable header parsing function should be standalone, so it may be
called from decoders, parsers, bitstream filters, and anything that may
require it.
More information about the ffmpeg-devel
mailing list