Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
According to the instructions on the https://developer.android.com/reference/android/media/MediaCodec.html, when playing mpeg4 encoded video, the esds data must be submitted to csd-0 buffer, so I added a method named " restore_mpeg4_esds ", when enabled mediacodec_mpeg4 the esds data will be restored from codecpar-> extradata and submitted to csd-0 buffer, so that mpeg4 can be correctly decoded by mediacodec.
The implementation of "restore_mpeg4_esds" is referenced to http://xhelmboyx.tripod.com/formats/mp4-layout.txt "ES Descriptor box" section.
HOWEVER, not all devices can support DivX, so in ffpipenode_create_video_decoder_from_android_mediacodec() there's a filter using codec_tag to determine whether the video encoding is DivX or not.
AND this patch could solve issue #1428