Hi everybody, I have an MpegVideo, and some of the slices in the video have problems that I cannot decode them(let's say I have zeroed them out!) For these slices I want to manually pass the exact same dada of the previous frame to *mpeg_decode_slice*, so that it can decode them.
So I have questions regarding this(I have provided my guesses to answer each question and appreciate if you complete it or correct me, if I'm wrong): *1- How can I find out a slice is erroneous? * My possible answer to this question is by testing the output of * mpeg_decode_slice*, and see when it is *DECODE_SLICE_ERROR*(-1). Is this approach correct, or there are better ways of finding out? *2-How can I find exactly the same location in the previous frame to decode data from there?* Taking a look at the *mpeg_decode_slice*, function prototype: *mpeg_decode_slice (Mpeg1Context *s1, int mb_y, const uint8_t **buf, int buf_size)* I see that I have to pass a buffer pointer to it, and this buffer pointer holds the position in the bitstream from where I start reading data, but the question is how can I set *buf* to point to exactly the start of the corrosponding slice in the previous frame? I did also notice that I have a *Picture* pointer to the last picture accessible through *s1->mpeg_enc_ctx->last_picture*, can this be of any use?(since it seems I am going to copy data from the same location, but from the previous frame, and this seems to be the previous frame, but I can't find out how to use it to pass my desired data to *mpeg_decode_slice*) I appreciate any help, or advice or recommendation or even comment that you may have for me on this. Regards, Alireza _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
